package com.zt.bus.line.model;

import java.io.Serializable;
import java.util.Date;

import com.zt.system.model.BusinessException;
import com.zt.system.model.Entity;

import net.sf.json.JSONObject;

public class Dispatch extends Entity implements Serializable {
    private String id;

    private String planId;

    private String lineId;

    private String lineName;

    private String driverNo;
    
    private String driverPhone;

    private String driverName;
    
    private String vehicleNo;

    private Date departDate;

    private static final long serialVersionUID = 1L;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPlanId() {
        return planId;
    }

    public void setPlanId(String planId) {
        this.planId = planId;
    }

    public String getLineId() {
        return lineId;
    }

    public void setLineId(String lineId) {
        this.lineId = lineId;
    }

    public String getLineName() {
        return lineName;
    }

    public void setLineName(String lineName) {
        this.lineName = lineName;
    }

    public String getDriverNo() {
        return driverNo;
    }

    public void setDriverNo(String driverNo) {
        this.driverNo = driverNo;
    }

    public String getDriverName() {
        return driverName;
    }

    public void setDriverName(String driverName) {
        this.driverName = driverName;
    }

    public String getVehicleNo() {
		return vehicleNo;
	}

	public void setVehicleNo(String vehicleNo) {
		this.vehicleNo = vehicleNo;
	}
	
    public Date getDepartDate() {
        return departDate;
    }

    public void setDepartDate(Date departDate) {
        this.departDate = departDate;
    }
    
    
    public JSONObject toJson(Dispatch dispatch){
    	if(dispatch == null){
    		throw new BusinessException("转换参数错误");
    	}
    	JSONObject json = new JSONObject();
    	json.put("planId", dispatch.getPlanId());
    	json.put("lineId", dispatch.getLineId());
    	json.put("lineName", dispatch.getLineName());
    	json.put("departDate", dispatch.getDepartDate());
    	json.put("driverName", dispatch.getDriverName());
    	json.put("vehicleNo", dispatch.getVehicleNo());
    	json.put("driverNo", dispatch.getDriverNo());
    	return json;
    }

	public String getDriverPhone() {
		return driverPhone;
	}

	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
	}

	
}